home *** CD-ROM | disk | FTP | other *** search
/ Dynamic HTML Construction Kit / Dynamic HTML Construction Kit.iso / source_code / dhtmlunl / dhtml.exe / CD Content / Chap08 / dun8_5.txt < prev    next >
Encoding:
Text File  |  1997-12-18  |  1.1 KB  |  41 lines

  1. <html>
  2. <head>
  3. <title>Doorway</title>
  4. </head>
  5. <script language="JavaScript1.2">
  6. <!---//
  7. //by specifying 'JavaScript1.2' as the scripting
  8. //language, only NS 4.0 and higher "sees" this script.
  9. //the routeMe() function simply changes the current
  10. //window's location to Netscape's page.
  11. function routeMe() {
  12.     self.location="http://www.netscape.com/";
  13.     return false;
  14.     //some people have asked why I use "return false"
  15.     //on this script.  Simple... the onClick event is
  16.     //setting netscape up to link to another page. By
  17.     //returning "false", you're telling the browser not
  18.     //to follow that link.
  19. }
  20. //--->
  21. </script>
  22. <script language="VBScript">
  23. <!---//
  24. //by specifying 'VBScript' as the scripting language for
  25. //this block, only MSIE 3.0 and higher "sees" this script.
  26. //again, the routeMe() sub changes the current
  27. //window's location to Microsoft's page.
  28. Sub routeMe()
  29.     self.location="http://www.microsoft.com/"
  30. End Sub
  31. //--->
  32. </script>
  33. <body bgcolor="#ffffff">
  34. <center>
  35. <form>
  36. <input type="button" onClick="routeMe()" value="Go Home!">
  37. </form>
  38. </center>
  39. </body>
  40. </html>
  41.